﻿using System;
using System.Collections.Generic;
using System.Xml;
using System.Text;

namespace EasyLoger.Configuration
{
    internal class LogConfig
    {
        private string _defaultlog;
        private string _defaultlogType;
        private XmlNode _cfgNode;
        public string Defaultlog
        {
            get
            {
                return this._defaultlog;
            }
        }
        public string DefaultlogType
        {
            get
            {
                return this._defaultlogType;
            }
        }
        public XmlNode CfgNode
        {
            get
            {
                return this._cfgNode;
            }
        }
        public LogConfig(XmlNode sectionNode)
        {
            XmlNode xmlNode = sectionNode.SelectSingleNode("root/defaltlog");
            this._defaultlog = xmlNode.Attributes["name"].Value;
            this._cfgNode = sectionNode.SelectSingleNode("loger[@name='" + this._defaultlog + "']");
            this._defaultlogType = this._cfgNode.Attributes["type"].Value;
        }
    }
}

